package com.wbk.lotterysystemlotteryservice.service;

import com.wbk.lotterysystemlotteryservice.entity.Record;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface RecordService {

    //创建报名记录
    int create(Record record);

    //某个抽奖活动已报名人数
    List<Record> getAllWithLottery(Integer lotteryId);

    //是否已经参加过
    Boolean alreadyJoin(Integer lotteryId, Long userNo);

    //某个抽奖活动的中奖纪录
    List<Record> getWinner(Integer lotteryId);

    //用户参加过的抽奖记录
    List<Record> hasJoin(Long userNo);

    //查询抽奖记录
    Record query(Integer lotteryId, Long userNo);

    //更新抽奖结果
    int update(Record record);
}
